package com.colorfruit.admin.business.dao;

import com.colorfruit.admin.pojo.entity.PayBusinessOrder;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface PayBusinessOrderMapper {
    int deleteByPrimaryKey(Long id);

    int insert(PayBusinessOrder record);

    int insertSelective(PayBusinessOrder record);

    PayBusinessOrder selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(PayBusinessOrder record);

    int updateByPrimaryKey(PayBusinessOrder record);

    PayBusinessOrder getRecentOrder(@Param("userId") String userId);

    PayBusinessOrder getByBusinessNo(@Param("businessNo") String businessNo);

    List<PayBusinessOrder> selectPayBusinessOrderList(@Param("userId") String userId,
                                                      @Param("recordStatus") Byte recordStatus);

    List<PayBusinessOrder> selectPayBusinessOrderListGlobal(@Param("userId") String userId,
                                                            @Param("recordStatus") Byte recordStatus,
                                                            @Param("globalId") Long globalId);

    List<PayBusinessOrder> selectBusinessListByGlobalId(@Param("globalId") Long globalId);

    List<PayBusinessOrder> selectOrderListByCondition(@Param("globalId") Long globalId,
                                                      @Param("distributeAddressId") Long distributeAddressId,
                                                      @Param("keyWord") String keyWord,
                                                      @Param("distributeStatus") Byte distributeStatus);
    //取消订单
    int cancelOrder(@Param("businessNo") String businessNo);
    //订单发货
    int sendProduct(@Param("pickAddressId") Long pickAddressId, @Param("globalId") Long globalId);
    //签收订单
    int signOrder(@Param("businessNo") String businessNo);
    //添加物流照片
    int addLogicPicture(@Param("businessNo") String businessNo,
                        @Param("logicPicture") String logicPicture);
    //更新分发状态
    int updateDistributeStatus(@Param("businessNo") String businessNo,
                               @Param("distributeStatus") Byte distributeStatus);
}